
use nat_BLA_data_1945_2020, clear

tsset code year

*Copy available 
egen copyavailable_tot = rowtotal(copyavailable?)

by code: gen copyavailable_totsum = sum(copyavailable_tot)

gen copyshare_totsum = copyavailable_totsum/bla_totsum

	*b) By region

	preserve

		collapse (sum) bla_past, by(year region)
		
		#delimit ;
		
		twoway (line bla_past year if region=="Africa" , lc(black) lw(*2) )
			(line bla_past year if region=="Americas", lc(black) lw(*0.5))
			(line bla_past year if region=="Asia", lc(black) lp(dash) )
			(line bla_past year if region=="Europe", lc(gs10) lp(dash) )
			(line bla_past year if region=="Oceania", lc(black) lp(dot) lw(*2)), 
			legend(order(1 "Africa" 2 "Americas" 3 "Asia" 4 "Europe" 5 "Oceania") 
			rows(2)) xlab(#15, angle(45) labsize(*0.7)) ylab(#5, labsize(*0.7) angle(0))
			graphregion(color(white)) xt("") yt("") name(bla_countries_region, replace);
		
		#delimit cr
		

	restore
